<template>
  <div class="home">
    <input type="text" v-modex   l="msg" />
    <p>
      {{ msg }}
    </p>
  </div>
</template>

<script>
import HomeHttp from "../../model/HomeHttp";
import throttle from '../../assets/js/throttle'
export default {
  name: "Home",
  data() {
    return {
      msg: "hello world",
    };
  },
  mounted() {},
  watch: {
    msg:throttle(function(){
      this.getSearch(this.msg)
    })
  },
  methods: {
    async getSearch(val) {
      var res = await HomeHttp.getPlaylists(val);
      console.log(res);
    },
  },
};
</script>
